<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/tabs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/ajaxException.js"></script>
<script language="JavaScript" src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript">
	//整改项目ID
	var perfectItemRequisitionId = ${perfectItemRequisitionId };

	var keyword = null;
	var url = null;
	function editPage(isEdit){
		url = getAction('trackEditPage') + '&perfectItemRequisitionId=' + perfectItemRequisitionId;
		if(isEdit){
			if(keyword == null){
		 	   	Alert('请选择数据！');
		      	return false;
		 	 }
			var vAjax = getAction('hasTrackState') + '&keyword=' + keyword;
			new Ajax.Request(vAjax,{method: 'post' ,onSuccess : function(response){
				ajaxSubmitException(response.responseText);
				if(response.responseText == 'true'){
					url = url + '&keyword=' + keyword;
					top.windowOpen(url, 'trackEditPage', '跟进项目', 320, 470, true,'trackEditPage');
				}
			}});
			
		}else{
			var vAjax = getAction('checkAddIsTrue') + '&keyword=' + ${perfectItemRequisitionId };
			new Ajax.Request(vAjax,{method: 'post' ,onSuccess : function(response){
				ajaxSubmitException(response.responseText);
				if(response.responseText == 'true'){
					top.windowOpen(url, 'trackEditPage', '跟进项目', 320, 470, true,'trackEditPage');
				}
			}});
		}
	}

	//删除
	function itemDelete(){
	 	  if(keyword == null){
	 	   	Alert('请选择数据！');
	      	return false;
	 	  }
	 	  else{
			url = getAction('checkDeleteTreckIsTrue') + '&keyword=' + keyword;
			new Ajax.Request(url,{method: 'post' ,onSuccess : function(response){

	    	ajaxSubmitException(response.responseText);
	    	AskConfirm("${key.tipsByDeleteConfirm}","TrackPageFrame","deleteItem");
			}});
		}
	}
	
	function deleteItem(){
		url = getAction('deletePerfectItemTrack') + '&keyword=' + keyword;
		new Ajax.Request(url,{method: 'post' ,onSuccess : function(response){
			ajaxSubmitException(response.responseText);
			if(response.responseText == 'true'){
				refresh();
			}
		}});
	}

	//选择行
	function selectItem(item){
		keyword = item;
	}

	//刷新
	function refresh(){
		$('perfectItemTrackList').src = '${ctx }/occupation_perfectItemRequisitionAction.do?method=trackListPage&keyword=${perfectItemRequisitionVO.keyword }';
		findFrame('main').refresh();
		keyword = null;
	}

	//取得action方法
	function getAction(method){
		return '${ctx }/occupation_perfectItemRequisitionAction.do?method=' + method;
	}
	
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>整改项目-详细</title>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="window_head_outBg">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle" /> <span class="window_head_intext">整改跟进</span></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="aux_header_line_1"></td>
	</tr>
	<tr>
		<td class="aux_header_line_2"></td>
	</tr>
	<tr>
		<td class="content">

		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="aux_outtable_color">
				<table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
					<tr>
						<td class="aux_intable_td1">申报项目类型：</td>
						<td class="aux_intable_td2">${perfectItemRequisitionVO.perfectItemTypeConfigName }</td>
						<td rowspan="2" valign="top" class="aux_intable_td1">期望结果：</td>
						<td rowspan="2" valign="top" class="aux_intable_td2">${perfectItemRequisitionVO.expectationResult }</td>
					</tr>
					<tr>
						<td class="aux_intable_td1">问题描述：</td>
						<td class="aux_intable_td2">${perfectItemRequisitionVO.description }</td>
					</tr>

					<tr>
						<td colspan="4" class="aux_intable_td1">
						<c:if test="${hasToolbar }">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="35%" align="right" class="bg_toolBar"><table border="0" cellpadding="0" cellspacing="0" id="ico1">
                                        <tr>
                                          <td class="toolbarico"><a href="#"  onclick="javascript:editPage(false);" onfocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新增"/></a></td>
                                          <td  class="toolbarico" ><a href="#" onFocus="this.blur()" onClick="javascript:editPage(true);"><img src="${ctx}/images/ico_amend.gif" alt="修改" width="16" height="16" border="0" align="absbottom" /></a></td>
                                          <td class="toolbarico"><a href="#" onClick="javascript:itemDelete();" onFocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" alt="删除" width="16" height="16" border="0" align="absbottom" /></a></td>
                                          <td  class="toolbarico">&nbsp;</td>
                                        </tr>
                                      </table></td>
                                    </tr>
                                </table>
                         </c:if>
						<iframe src="${ctx }/occupation_perfectItemRequisitionAction.do?method=trackListPage&keyword=${perfectItemRequisitionVO.keyword }&isHide=${hasToolbar }" name="perfectItemTrackList" id="perfectItemTrackList" width="100%" height="200px" frameborder="0" scrolling="true"> </iframe>
						</td>
					</tr>

				</table>
				</td>
			</tr>



		</table>

		</td>
	</tr>

	<tr>
		<td class="window_footer">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td class="btn_between_space"></td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="buttonOffLeft" id="btn1_31"></td>
						<td class="buttonOffMiddle" id="btn1_32" onclick="javascript:windowClose();" onblur="btn_change(3)" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)">
						<img src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" /> 关 闭</td>
						<td class="buttonOffRight" id="btn1_33"></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>

</table>

</body>
</html>